import React, { memo, useRef } from 'react'
import { Switch, Route, Redirect } from 'react-router-dom';

import './index.css';
import Concern from './Concern';
import Home from './Home';
import MyMusic from './MyMusic';
import Search from './Search/index';
// import 
const Body = memo(() => {
  

  return (
    <div>
      <Switch>
        {/* 官网做法 ，不进行重定向*/}
        <Route exact path={'/'} component={Home}></Route>
        <Route path={'/home'} component={Home}></Route>
        <Route path={'/mymusic'} component={MyMusic}></Route>
        <Route path={'/concern'} component={Concern}></Route>
        <Route path={'/search'} component={Search }></Route>
        {/* <Redirect to='/home'></Redirect> */}
      </Switch>
    </div>
  )
})

export default Body